package cn.yuan.product.domain;

import cn.yuan.basic.domain.Base;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product extends Base {
    private String name;
    //资源地址，多个逗号分割
    private String resources;
    private BigDecimal saleprice;//精确到分
    private BigDecimal costprice;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    private Date onsaletime;
    private Integer state = 0;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    private Date createtime = new Date();
    private Long salecount;

    //接收前端传的详情
    private ProductDetail detail;
}
